package com.zsc.wxm.ysh.anjo.service.base.enums.resources;

import lombok.Getter;

/**
 * 描述：资讯广告枚举
 *
 * @author playmaker
 * @since 2021/3/13 1:09
 */
@Getter
public enum AdvertiseStatus {
    /**
     * 枚举
     */
    VALID(1, "有效"),
    NOT_VALID(2, "无效")
    ;

    /**
     * 值
     */
    private int value;

    /**
     * 描述
     */
    private String desc;

    AdvertiseStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getEnumDesc(int value) {
        for (AdvertiseStatus type : AdvertiseStatus.values()) {
            if (type.getValue() == value) {
                return type.getDesc();
            }
        }
        return "";
    }
}
